package com.example.Interface;

public class Test4Interface {
    public static void main(String[] args) {
        InterCImpl ic = new InterCImpl();
        ic.start();
        ic.end();

        InterC.open();
        InterC.close();
    }
}

interface InterC {
    public default void start() {
        log();
        System.out.println("start方法");
    }

    public default void end() {
        log();
        System.out.println("end方法");
    }

    private void log() {
        System.out.println("日志记录");
    }

    private static void check(){
        System.out.println("权限校验");
    }

    public static void open() {
        System.out.println("open方法");
        check();
    }

    public static void close() {
        System.out.println("close方法");
        check();
    }
}

class InterCImpl implements InterC {

}